
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@3"></script>
</head>
<body>
    <div id="app">
      {{ message }}
      <p>姓名：{{name}}</p>
      <p>年龄:{{age}}</p>
      <!-- 默认不会渲染标签内容，渲染的内容都是字符串 -->
      <p>{{desc}}</p>
      <!-- 使用v-html指令，可以使用渲染标签 -->
      <p v-html='desc'></p>

    </div>
    
    <script>
        const { createApp } = Vue
      
        createApp({
          data() {
            return {
              message: 'Hello Vue!',
              name:'yw',
              age:18,
              desc:'<a href="https://www.baidu.com">百度</a>'
            }
          }
        }).mount('#app')
      </script>
</body>
</html>